import { createStore, applyMiddleware } from "redux";
import { state } from "./state";
import { defReducer } from "./reducers";
import { defSaga } from "./sagas";
import createSagaMiddleware from "redux-saga";
const sagaMiddleware = createSagaMiddleware();
//构建store

export default createStore(
  defReducer,
  state(),
  applyMiddleware(sagaMiddleware)
);
sagaMiddleware.run(defSaga);
